package com.sergio.compress.model.type2;

import com.sergio.compress.model.channelWapper.ProtoWrapper;
import com.sergio.compress.model.proto.Gift;
import com.sergio.compress.model.proto.Mock;

/**
 * @Author : Sergio.D
 * @Description :
 * @CreateDate ：2023/6/17 15:46
 */
public class Proto2 extends ProtoWrapper<Mock.MockDataBase> {
    @Override
    public Class<Mock.MockDataBase> getMainClazz() {
        return Mock.MockDataBase.class;
    }


    @Override
    public byte[] getSendBytes() {
        return this.dataSend.toByteArray();
    }

    @Override
    public Mock.MockDataBase dseSource(byte[] source) {
        try {
            return Mock.MockDataBase.parseFrom(source);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
}
